//
//  ShowArtDetailVC.m
//  ShowMe
//
//  Created by 123 on 2018/9/27.
//  Copyright © 2018年 nkl. All rights reserved.
//

#import "ShowArtDetailVC.h"
#import <WordPressEditor/WPEditorView.h>

@interface ShowArtDetailVC ()<UITableViewDelegate,UITableViewDataSource>


@end

@implementation ShowArtDetailVC

-(UITableView *)basetableView{
    if (!_basetableView) {
        _basetableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, __KLSCREENWIDTH__, __KLSCREENHEIGHT__) style:UITableViewStylePlain];
    }
    return _basetableView;
}

-(void)viewDidLoad{
    [super viewDidLoad];
    self.headerHeight = __KLSCREENHEIGHT__;
    self.basetableView.delegate = self;
    self.basetableView.dataSource = self;
}

-(void)customizeAppearance{
    [self.editorView removeFromSuperview];
    [self.view addSubview:self.basetableView];
    self.view.backgroundColor = UIColor.whiteColor;
    self.editorView.frame = CGRectMake(0, 0, __KLSCREENWIDTH__, __KLSCREENHEIGHT__);
    self.editorView.userInteractionEnabled = NO;
}

-(void)setHeaderHeight:(CGFloat)height{
    self.editorView.frame = CGRectMake(0, 0, __KLSCREENWIDTH__, __KNewSize(height));
    NSLog(@"tableHeader---%@",NSStringFromCGRect(self.basetableView.frame));
    self.basetableView.tableHeaderView = self.editorView;
    [self.basetableView reloadData];
}


-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 20;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString * cellID = @"cellID";
    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
    }
    cell.textLabel.text = @"asdsada";
    cell.textLabel.textColor = UIColor.blackColor;
    return cell;
}

@end
